﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using POI.eTransmittal.Enitity;

namespace POI.eTransmittal.WebApp
{
    public partial class ParameterSetup : BasePage
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            PrepareParameter();
            RegisterXpodatasource(xpoDsParam);
        }

        private void PrepareParameter()
        {
            GeneralParameter.CreateParam(CurrentUnitOfWork, GeneralParameter.SMTP_AUTHEN_TYPE, typeof(string), "");
            GeneralParameter.CreateParam(CurrentUnitOfWork, GeneralParameter.SMTP_PORT, typeof(int), "25");
            GeneralParameter.CreateParam(CurrentUnitOfWork, GeneralParameter.SMTP_SERVER, typeof(string), "");
            GeneralParameter.CreateParam(CurrentUnitOfWork, GeneralParameter.SMTP_USE_LOCAL, typeof(Boolean), "true");
            GeneralParameter.CreateParam(CurrentUnitOfWork, GeneralParameter.SMTP_USER_NAME, typeof(string), "");
            GeneralParameter.CreateParam(CurrentUnitOfWork, GeneralParameter.SMTP_USER_PASS, typeof(string), "");
            GeneralParameter.CreateParam(CurrentUnitOfWork, GeneralParameter.SYSTEM_EMAIL, typeof(string), "");
        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ASPxGridView1_RowUpdated(object sender, DevExpress.Web.Data.ASPxDataUpdatedEventArgs e)
        {
            CurrentUnitOfWork.CommitChanges();
        }
    }
}